package com.wasu.entity.live;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * <p>------------------------------------------------------
 * <p>Copyright (C) 2020 wasu company, All rights reserved.
 * <p>------------------------------------------------------
 * <p> 保存回放地址
 * <p>
 *
 * @author Created by zhangmz
 * @date on 2023/8/1
 */
public class TsPlaybackUrls implements Parcelable {

    /**
     * CDN类型(即CDN环境)
     */
    private String cdnType;
    /**
     * 码率值
     */
    private String bitRate;
    /**
     * 时移回放类型：1-时移；2-回放；3-时移回放
     */
    private String timeShiftType;
    /**
     * 播放地址
     */
    private String playUrl;

    /**
     * 标识CDN质量的枚举值
     * 1-糟糕的；2-一般的；3-良好的；4-极好的
     */
    private String cdnQuality;
    /**
     * CDN类型(即CDN环境)
     */
    private String protType;

    public TsPlaybackUrls(){

    }

    public TsPlaybackUrls(String cdnType, String bitRate, String timeShiftType, String playUrl, String cdnQuality, String protType) {
        this.cdnType = cdnType;
        this.bitRate = bitRate;
        this.timeShiftType = timeShiftType;
        this.playUrl = playUrl;
        this.cdnQuality = cdnQuality;
        this.protType = protType;
    }

    protected TsPlaybackUrls(Parcel in) {
        cdnType = in.readString();
        bitRate = in.readString();
        timeShiftType = in.readString();
        playUrl = in.readString();
        cdnQuality = in.readString();
        protType = in.readString();
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(cdnType);
        dest.writeString(bitRate);
        dest.writeString(timeShiftType);
        dest.writeString(playUrl);
        dest.writeString(cdnQuality);
        dest.writeString(protType);
    }

    @Override
    public int describeContents() {
        return 0;
    }

    public static final Creator<TsPlaybackUrls> CREATOR = new Creator<TsPlaybackUrls>() {
        @Override
        public TsPlaybackUrls createFromParcel(Parcel in) {
            return new TsPlaybackUrls(in);
        }

        @Override
        public TsPlaybackUrls[] newArray(int size) {
            return new TsPlaybackUrls[size];
        }
    };

    public String getCdnType() {
        return cdnType;
    }

    public void setCdnType(String cdnType) {
        this.cdnType = cdnType;
    }

    public String getBitRate() {
        return bitRate;
    }

    public void setBitRate(String bitRate) {
        this.bitRate = bitRate;
    }

    public String getTimeShiftType() {
        return timeShiftType;
    }

    public void setTimeShiftType(String timeShiftType) {
        this.timeShiftType = timeShiftType;
    }

    public String getPlayUrl() {
        return playUrl;
    }

    public void setPlayUrl(String playUrl) {
        this.playUrl = playUrl;
    }

    public String getCdnQuality() {
        return cdnQuality;
    }

    public void setCdnQuality(String cdnQuality) {
        this.cdnQuality = cdnQuality;
    }

    public String getProtType() {
        return protType;
    }

    public void setProtType(String protType) {
        this.protType = protType;
    }

    @Override
    public String toString() {
        return "TsPlaybackUrls{" +
                "cdnType='" + cdnType + '\'' +
                ", bitRate='" + bitRate + '\'' +
                ", timeShiftType='" + timeShiftType + '\'' +
                ", playUrl='" + playUrl + '\'' +
                ", cdnQuality='" + cdnQuality + '\'' +
                ", protType='" + protType + '\'' +
                '}';
    }
}
